/*
 * @Description: 消息管理接口模块
 * @version: 电子名片2.0
 * @Author: 尹鑫
 * @Date: 2020-12-02 09:31:16
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-12-15 14:40:37
 */
import request from '@/utils/request'

// =======================系统消息=======================

// 系统消息列表
export function notifySysAll(query) {
  return request({
    url: '/notify/platform/notify/sys/all',
    method: 'get',
    params: query
  })
}

// 系统消息详情
export function notifySysDetail(notifyId) {
  return request({
    url: `/notify/platform/notify/sys/detail/${notifyId}`,
    method: 'get'
  })
}
// 编辑消息
export function notifySysEdit(data) {
  return request({
    url: '/notify/platform/notify/sys/edit',
    method: 'post',
    data
  })
}
// 删除消息
export function notifySysDel(id) {
  return request({
    url: `/notify/platform/notify/sys/del/${id}`,
    method: 'delete'
  })
}

// =======================触发消息=======================

export function notifyAll(params) {
  return request({
    url: '/notify/platform/notify/trigger/all',
    method: 'get',
    params
  })
}

export function notifyEdit(data) {
  return request({
    url: '/notify/platform/notify/trigger/edit',
    method: 'post',
    data
  })
}

export function notifyDetail(notifyId) {
  return request({
    url: `/notify/platform/notify/trigger/detail/${notifyId}`,
    method: 'get'
  })
}

export function notifyDel(id) {
  return request({
    url: `/notify/platform/notify/trigger/del/${id}`,
    method: 'delete'
  })
}

export function notifyUse(data) {
  return request({
    url: `/notify/platform/notify/trigger/use`,
    method: 'post',
    data
  })
}

// =======================短信消息=======================
export function notifySmsAll(params) {
  return request({
    url: '/notify/platform/notify/sms/all',
    method: 'get',
    params
  })
}

export function notifyTemplateSel() {
  return request({
    url: '/notify/platform/conf/sms/template/sel',
    method: 'get'
  })
}

export function notifySmsDetail(id) {
  return request({
    url: `/notify/platform/notify/sms/detail/${id}`,
    method: 'get'
  })
}

export function notifySmsEdit(data) {
  return request({
    url: '/notify/platform/notify/sms/edit',
    method: 'post',
    data
  })
}

export function notifySmsDel(id) {
  return request({
    url: `/notify/platform/notify/sms/del/${id}`,
    method: 'delete'
  })
}

export function tagDownList() {
  return request({
    url: `/member/platform/member/tag/downList`,
    method: 'get'
  })
}
export function tagDownList2() {
  return request({
    url: `/member/platform/job/module/list`,
    method: 'get'
  })
}



export function tagTriggerList() {
  return request({
    url: `/notify/platform/notify/trigger/sel`,
    method: 'get'
  })
}
















